package com.github.webuploader;

import java.util.Map;

import com.github.plupload.Plupload;

public class WebUploader extends Plupload {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -4234607021200442955L;

	private String ext;
	private String type;
	private String id;
	private String md5;
	private Integer size;

	public WebUploader() {
		super();
	}

	public WebUploader(Map<String, String[]> parameterMap) {
		super(parameterMap);
		if (parameterMap.containsKey("ext")) {
			this.ext = parameterMap.get("ext")[0];
		}
		if (parameterMap.containsKey("type")) {
			this.type = parameterMap.get("type")[0];
		}
		if (parameterMap.containsKey("id")) {
			this.id = parameterMap.get("id")[0];
		}
		if (parameterMap.containsKey("md5")) {
			this.md5 = parameterMap.get("md5")[0];
		}
		if (parameterMap.containsKey("size")) {
			this.size = Integer.valueOf(parameterMap.get("size")[0]);
		}
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMd5() {
		return md5;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public String getExt() {
		return ext;
	}

	public void setExt(String ext) {
		this.ext = ext;
	}
}
